Print 'START: Crear la tabla Proveedores'
CREATE TABLE MARAVILLA_SQL.Proveedores(
	intIdProveedor	int	IDENTITY(1, 1)	NOT NULL,
	varRS	nvarchar(100) NOT NULL,
	varDom	nvarchar(100) NOT NULL,
	intTelefono	numeric(18, 0) NOT NULL,
	varCUIT nvarchar(20) NOT NULL,
	bitIsDeleted	bit	NOT NULL DEFAULT 0,
	intIdCiudad	int	NOT NULL,
	intIdRubro	int NOT NULL,
	varMail nvarchar(255) NULL,
	varNombreContacto nvarchar(255) NULL,
	intCodigoPostal int NULL  DEFAULT 0,
	intIdUsuario int NULL,
	UNIQUE (varCUIT),
	UNIQUE (varRS),
	CONSTRAINT PK_Proveedores PRIMARY KEY CLUSTERED
	(
		IntIdProveedor ASC
	)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
	, FOREIGN KEY (intIdCiudad) REFERENCES MARAVILLA_SQL.Ciudades(IntIdCiudad)
	, FOREIGN KEY (intIdRubro) REFERENCES MARAVILLA_SQL.Rubros(IntIdRubro)
) ON [PRIMARY]

--GO
--ALTER TABLE [MARAVILLA_SQL].[Proveedores] ADD  CONSTRAINT [DF_Proveedores_bitIsDeleted]  DEFAULT ((0)) FOR [bitIsDeleted]
GO
Print 'END: Crear la tabla Proveedores'